//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    "indexImages":[]
  },

  onLoad: function () {
    wx.setNavigationBarTitle({
      title: '新品',
    })
    app.get('merapi/index/index').then(res=>{
      if(res.data.code == 0) {
        let swipers = res.data.data.swipers
        let images = []
        for(let item of swipers) {
          images.push(app.globalData.remote_static + item.path)
        }
        this.setData({
          indexImages: images
        })
      }
    }).catch(err => {
      wx.showToast({
        title: '系统错误',
      })
    })
  }
})
